package org.jeecg.modules.business.outbound.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.business.outbound.entity.WmsOutReceiptTaskPick;
import org.jeecg.modules.business.outbound.entity.vo.OutboundTaskFullPickVO;
import org.jeecg.modules.business.outbound.entity.vo.OutboundTaskUnPickVO;
import org.jeecg.modules.business.outbound.entity.vo.OutboundTaskPickVO;

import java.util.List;

/**
 * @Description: 出库任务-拣货
 * @Author: jeecg-boot
 * @Date:   2023-08-09
 * @Version: V1.0
 */
public interface WmsOutReceiptTaskPickMapper extends BaseMapper<WmsOutReceiptTaskPick> {


    /**
     * 查询所有未拣货信息
     * @param taskId
     * @param materialName
     * @param batchCode
     * @return
     */
    IPage<OutboundTaskUnPickVO> listAllUnPick(@Param("page") IPage<WmsOutReceiptTaskPick> page, @Param("taskId") String taskId, @Param("materialName") String materialName, @Param("batchCode") String batchCode, @Param("deviceType") String deviceType);

    /**
     * 查询所有已拣货信息
     * @param taskId
     * @param materialName
     * @param batchCode
     * @return
     */
    List<OutboundTaskPickVO> listAllPicked(@Param("taskId")String taskId, @Param("materialName")String materialName,@Param("batchCode") String batchCode);

    /**
     * 分页查询所有已拣货信息
     * @param page
     * @param taskId
     * @param materialName
     * @param batchCode
     * @return
     */
    IPage<OutboundTaskPickVO> listPageAllPicked(@Param("page") IPage<WmsOutReceiptTaskPick> page, @Param("taskId") String taskId, @Param("materialName") String materialName, @Param("batchCode") String batchCode);


    /**
     * 分页查询所有已拣货信息(全)
     * @param page
     * @param taskId
     * @return
     */
    IPage<OutboundTaskFullPickVO> listPageAllFullPicked(@Param("page") IPage<WmsOutReceiptTaskPick> page,@Param("taskId") String taskId);

    /**
     * 查询所有已拣货信息 带批次号或者物料号
     * @param taskId
     * @param code
     * @return
     */
    List<OutboundTaskPickVO> listAllPickedByName(@Param("taskId") String taskId, @Param("code")String code);


    /**
     * 查询所有未拣货信息 带批次号或者物料号
     * @param taskId
     * @param code
     * @return
     */
    List<OutboundTaskUnPickVO> listAllUnPickByName(@Param("taskId") String taskId, @Param("code")String code);

    /**
     * 获取最新的记录忽略逻辑删除
     * @param taskId
     * @return
     */
    WmsOutReceiptTaskPick getNewestRecordIgnoreDelete(@Param("taskId") String taskId);



}
